package com.pet.bean;

import java.io.Serializable;

//宠物主人的Java实体类       实现数据的封装
public class Owner implements Serializable {
    private static final long serialVersionUID = 1L;
    //私有化的属性【成员变量】
    private Integer owner_id;
    private String name;
    private String password;
    private double wealth;
    private Integer status;

    //--构造器【有参、无参】  右键--》 sources --》generate constructor using fields
    public Owner(Integer owner_id, String name, String password, double wealth, Integer status) {
        this.owner_id = owner_id;
        this.name = name;
        this.password = password;
        this.wealth = wealth;
        this.status = status;
    }

    public Owner(String name, String password, double wealth, Integer status) {
        this.name = name;
        this.password = password;
        this.wealth = wealth;
        this.status = status;
    }

    public Owner(String name, String password, double wealth) {
        this.name = name;
        this.password = password;
        this.wealth = wealth;
    }

    public Owner() {
    }
    //--公有化的get、set方法    右键--》sources--》generate getters and setters
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getOwner_id() {
        return owner_id;
    }

    public void setOwner_id(Integer owner_id) {
        this.owner_id = owner_id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getWealth() {
        return wealth;
    }

    public void setWealth(double wealth) {
        this.wealth = wealth;
    }

    // --toString方法 右键--》 sources --》generate tostring
    @Override
    public String toString() {
        return "Owner{" +
                "owner_id=" + owner_id +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", wealth=" + wealth +
                ", status=" + status +
                '}';
    }
}
